﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApp.Models
{
    public class PagerModel
    { 
        /// <summary>
        /// 页码
        /// </summary>
        public int Page { get; set; }

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }


        /// <summary>
        /// 总记录条数
        /// </summary>
        public int Total { get; set; }




        public object Data { get; set; }


        public int GetTotalPage()
        {
            int TotalPage = Total / PageSize;

            if (Total % PageSize!=0)
            {
                TotalPage = TotalPage + 1;
            }
            return TotalPage;
        }


    }
}
